%CHAPTER 1: INTRODUCTION
\chapter{Introduction}
\label{chap:INTRODUCTION}%Used for reference
%SECTION 1.1
\label{section.motivation}
\section{Motivations and Objectives}
Nowadays, developing countries have suffered from natural disasters such as typhoon, tsunami, fire, and flood. For example, in Mekong Delta of Vietnam, under the impacts of climate change, the sea level rise around. This could make the flooding Mekong Delta every year. Thus, environment surveillance and prediction of such phenomenon become necessary. Simulation is a good approach for that purpose. It helps human make better decisions to prevent or relieve the impacts.\\
In recent years, wireless sensor network (WSN) emerges as a good candidate in monitoring the environment. Several inspiring projects have been launched as a common aim to sense the environment~\cite{WirelessSensorNetwork}. Sensors are used to collect status of physical systems and send status data to computer systems for processing, analyzing. Some reactions will be sent back to physical systems. A such integration between physical systems and computer systems pertain to Cyber-Physical Systems (CPS), as presented in Section~\ref{section.CPS}.\\
Therefore, it is necessary to consider sensing processes. The objective is to support and to validate operations of the WSN. Especially, it is responsible for dangerous accidents such as monitoring chemical store placed at residents regions. A composing model of the parallel simulations of the two sides of the CPS will thus be conducted.\\
However, modeling and simulating physical systems confront many issues. These systems often appear as huge systems and complex behaviour. This leads to a lot effort for designing the models. Moreover, the lack of interoperability is also a major challenge. In fact, they always impact to each other in the real world. For instance, the fire spread is influenced by several other factors, namely weather conditions, wind directions and speeds, responding abilities, and sensing performance of the wireless sensor network (WSN). In such systems, the model consists of a lot of components (fire spreading, weather conditions, firefighter, and WSN). These components and the their relations result in large scale models. Such models are very difficult to maintain and adopt. These circumstances bring about:
\begin{itemize}
	\item{long run times for simulation runs.}
	\item{long time for developing and testing of such models.}
	\item{huge effort for maintaining and for adapting the models for other perspectives.}
	\item{low flexibility and reusability.}
\end{itemize}
Traditionally, there are two common approaches to handle these problems. One solution is the employment of powerful hardware. The other is breaking up the model into a set of submodels, which are distributed on different computer systems. However, they come from separate works. Thus, in this project, we use a hybrid approach of the association of distributed models and parallel computations. It aims to enable and to adapt to huge size and complex behavior physical systems.\\
This approach can be viewed under two main aspects. For the problem of computing performance, the use of parallel simulations based on GPU is suggested. The powerful GPU has been considered in several studies to speed up large simulations over the last years. To deal with the lack of the interoperability of simulations, we use an IEEE standard High Level Architecture (HLA), which provides independent simulations the ability to communicate together in the context of a synchronous system.\\
\begin{comment}
Consequently, a public domain tool is developed to enable concurrent executions of parallel simulations of physical systems and sensor network systems. It is worth noting that it is useful to suggesting optimized solutions for designing infrastructures by verifying the accuracy of the sensing process of the network.\\
\end{comment}
The thesis is roughly divided into five chapters:

\textit{Chapter 1:} An introduction to the motivations and the objectives of the study is presented. An overview of related concepts will be described such as Cyber-Physical Systems (CPS), Cellular Automata (CA). A description of PickCell tool and its applications will end the chapter.

\textit{Chapter 2:}{ A new approach is to simplify the process of modeling physical systems. The approach is facilitated by the PickCell tool in accordance with the CA.}

\textit{Chapter 3:}{ Describing the use of Cuda programming model to simulate physical models. Some experiments are conducted to evaluate the feasibility of the solution.}

\textit{Chapter 4:}{ Using the HLA standard to deal with the lack of interoperability of several simulations. It enables parallel simulations to be able to communicate together in context of distributed systems.}

\textit{Chapter 5:}{ Summarising the contributions and presenting future work.}
%SECTION 1.2
\section{Cyber-Physical Systems (CPS)}
\label{section.CPS}
Cyber-Physical Systems (CPS) are integration of computation and physical processes~\cite{Lee10_CPSFoundations},~\cite{cyber_physical_systems}. In which, embedded computers and networks monitor and control the physical processes. It includes feedback loops where physical processes affect computations and vice versa. 
	\begin{figure}[H]
		\begin{center} 
		      \includegraphics[height=8cm]{img/CPS.png}
		      \caption{An example of Cyber-Physical System.}
		      \label{img:CPS}
		\end{center}
	\end{figure}
An example of CPS is illustrated in Figure~\ref{img:CPS}, as an illustrating of monitoring accidents (pollution, flood, landslides, chemical spreading, as example) in the river. A WSN can be used to observe the status of the river via sensors. Sensors forward status data to computer systems, which will carry out computations. An analysis of computed results can lead to some emergency operations, giving some signals or closing the basin, in the case of the accidents. Apparently, for implementation of this type of system, one of critical challenges is system integration. Therefore, to obtain the interoperability of simulations, an integration solution is required.\\
In fact, on~\cite{DistributedSimulation_Lasinier}, the authors presented a co-simulation framework based on the HLA standard. That work focus on integrating heterogeneous systems, designed in different tools and languages, as CPSs. However, the given prototype has not taken care for phenomena and computation performance as well. Thus, the considerations in this project are expected to provide another perspective on phenomena simulations.
\section{Cellular Automata (CA)}
\label{section.cellularautomata}
Cellular Automaton (CA) is one of the techniques used in simulating complex physical systems such as self-reproduction in biology, diffusion models in chemistry. The famous "Game of Life", it illustrates that cellular automata have capacity of producing dynamic patterns and structures~\cite{CellularAutomata},~\cite{CellularAutomata2}.\\
According to \cite{RobertMItami}, a major effort is presented to show the advantages of using CA for modeling systems, especially for natural phenomena. The use of CA for modeling phenomena is clearer, more accurate, and more complete than conventional mathematical system. Moreover, the transition rules of CA models are often simpler than mathematical equations, but the result produced is more comprehensive. It can mimic the actions of any possible physical systems. A CA typically consists of two main components.\\
The first component is a \textit{cellular space} that is a lattice of cells, each with an identical pattern of local connection to other cells for input and output. The cell has a set of states that is chosen from a finite number states. In the simplest case each cell can have the binary states 1 or 0. A set of cells called neighbourhood is defined relatively to the specified cell (center). The states of the neighbours will be used to calculate the next state of the center according to the defined rule. The number of neighbour depend on the pattern chosen in modeling process.\\
The second component is a transition rule (CA rule) giving the update of the state (at time t+1) of each cell according to its current state and the states of its neighbourhood (at time t). Typically, the rules for updating states of all cells are the same and do not change over time.\\
%However, there are also some unknown exceptions, such as stochastic cellular automata and asynchronous cellular automata.\\
Generally, the CA exits under various forms. The simplest CA is one being the one-dimensional lattice, meaning that all the cells are arranged in a line. Then, the neighbourhood of the cell are just in its left and its right. Meanwhile, for the two-dimensional lattice, the most common types of neighbourhood are Moore neighbourhood and Von Neumann neighbourhood (see Figure~\ref{img:CellularAutomata1}).
\begin{figure}[H]
	\begin{center} 
		 \includegraphics[height=4cm]{img/CellularAutomata.png}
		 \caption{Von Neumann and Moore neighbourhood (distance = 1).}
		 \label{img:CellularAutomata1}
	\end{center}
\end{figure}
In Von Neumann neighbourhood, each cell has four neighbourhood, north (N), south (S), east (E), and west (W). We thus have 32 ($2^5$) possible. Meanwhile, for the latter, each cell totally has nine cells, then 512 ($2^9$) possible patterns can be produced. In both cases, the distances are one and transition function is supposed to generate.\\
Therefore, in order to model systems with this approach, the two components need be accomplished: \textit{the cellular space} and \textit{the transition rules or behavior}. In the next chapter, an approach proposed in Lab-STICC laboratory to automatically generate the cellular spaces (cell networks) from geographic data is briefly presented. Input data and behavior of each cell will be later determined according to different interests on a certain physical system.
%-----------------------------------------------------------------------------------------------------------------------
